<%@ Page Language="c#" Inherits="PHSRAG.Insight21.Agreements.AgreementContractDetails"
    CodeFile="AgreementContractDetails.aspx.cs" %>

<%@ Register TagPrefix="cc2" Namespace="PHSRAG.WebControls" Assembly="PHSRAG.WebControls" %>
<%@ Register TagPrefix="cc1" Namespace="PHSRAG.Insight21.InsightWebControls" Assembly="PHSRAG.Insight21.InsightWebControls" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Agreement Contract Details</title>
    <link href="../Insight21.css" type="text/css" rel="stylesheet" />
    <style type="text/css">
        .sc {   SCROLLBAR-FACE-COLOR: #8080ff; 
                SCROLLBAR-ARROW-COLOR: #ffffff; 
                SCROLLBAR-TRACK-COLOR: #ddddff 
            }
	</style>

    <script language="Javascript" type="text/javascript" src="../Scripts/SQLReport.js"></script>

</head>
<body>
    <form id="ContractDetailsForm" method="post" runat="server">
        <table class="Container" width="100%">
            <tr>
                <td>
                    <table class="Header" width="100%">
                        <tr>
                            <td>
                                <cc1:Header ID="header" runat="server" OnNavigate="OnHeaderNavigate"></cc1:Header>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <cc1:AgreementsSubNavigation ID="agreementsSubNavigation" runat="server" EnableOverviewNavigation="False"
                                    OnNavigate="OnSubNavigate" />
                                <cc1:AgreementDetailsSubNavigation ID="agreementDetailsSubNavigation" runat="server"
                                    OnNavigate="OnDetailsSubNavigate" />
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <br />
                                <cc2:BreadCrumb ID="breadCrumb" runat="server" OnNavigate="OnNavigate"></cc2:BreadCrumb>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <cc1:ProjectHeaderBar ID="projectHeaderBar" runat="server" />
                            </td>
                        </tr>
                    </table>
                    <table id="dynamicTable" class="Invisible" cellspacing="10">
                        <tr>
                            <td>
                                <cc2:ActivityIndicator ID="activityIndicator" runat="server" ContainerID="dynamicTable">
                                </cc2:ActivityIndicator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <cc2:Annunciator ID="annunciator" runat="server" ContainerID="dynamicTable"></cc2:Annunciator>
                            </td>
                        </tr>
                    </table>
                    <table class="placeBar" cellspacing="0" cellpadding="0" border="0" style="border-color:red">
                        <tr>
                            <td class="PageName">
                                &nbsp;Contract Details</td>
                            <td align="right">
                                <cc1:InsightDownloadBar ID="reportDownload" useRootHost="true" runat="server"></cc1:InsightDownloadBar>
                            </td>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                    <table class="ContractDetailsStyle" width="100%" cellspacing="0" cellpadding="0"
                        border="0" style="border-color:red">
                        <tr>
                            <td style="background-color:white;width:2%">
                                &nbsp;<asp:ImageButton ID="subContractsPanelToggler" runat="server" OnClick="OnSubContractsClick">
                                </asp:ImageButton></td>
                            <td style="width:98%" class="ContractDetailsTitle">
                                &nbsp;Subcontracts</td>
                        </tr>
                    </table>
                    <asp:Panel ID="subContractsPanel" runat="server">
                        <table id="subContractsTable" width="100%" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="background-color:white;width:2%">
                                    &nbsp;</td>
                                <td>
                                    <table width="100%" cellspacing="0" style="border-left: 1px solid #325486">
                                        <tr>
                                            <td>
                                                <asp:DataGrid ID="subContracts" runat="server" Width="100%" AutoGenerateColumns="False"
                                                    CssClass="ContractDetailsDataGrid" AllowCustomPaging="True" AllowSorting="False"
                                                    OnItemDataBound="OnSubContractItemDataBound">
                                                    <AlternatingItemStyle CssClass="DataGridAlternatingItem"></AlternatingItemStyle>
                                                    <ItemStyle CssClass="DataGridItem"></ItemStyle>
                                                    <HeaderStyle CssClass="DataGridHeader"></HeaderStyle>
                                                    <Columns>
                                                        <asp:BoundColumn DataField="SubcontractorName" SortExpression="SubContractorName"
                                                            ReadOnly="True" HeaderText="Subcontractor Name"></asp:BoundColumn>
                                                         <asp:BoundColumn DataField="TotalBudget"  ReadOnly="True" HeaderText="Total Budget"></asp:BoundColumn>
                                                             <asp:BoundColumn DataField="AwardedToDate" ReadOnly="True" HeaderText="Awarded to Date"></asp:BoundColumn>
                                                        
                                                    </Columns>
                                                    <PagerStyle Visible="False"></PagerStyle>
                                                </asp:DataGrid>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <table class="ContractDetailsWarnings" width="100%">
                        <tr>
                            <td style="background-color:white;width:2%">
                                &nbsp;</td>
                            <td>
                                &nbsp;<asp:Label ID="subContractsWarning" runat="server" /></td>
                        </tr>
                    </table>
                    <br />
                    <table class="ContractDetailsStyle" width="100%" cellspacing="0">
                        <tr>
                            <td style="background-color:white;width:2%">
                                &nbsp;<asp:ImageButton ID="relatedProtocolsPanelToggler" runat="server" OnClick="OnRelatedProtocolsClick">
                                </asp:ImageButton></td>
                            <td style="width:98%" class="ContractDetailsTitle">
                                &nbsp;Related Protocols</td>
                        </tr>
                    </table>
                    <asp:Panel ID="relatedProtocolsPanel" runat="server">
                        <table id="relatedProtocolsTable" width="100%" cellspacing="0">
                            <tr>
                                <td style="background-color:white;width:2%">
                                    &nbsp;</td>
                                <td>
                                    <table width="100%" cellspacing="0" style="border-left: 1px solid #325486">
                                        <tr>
                                            <td>
                                                <asp:DataGrid ID="relatedProtocols" runat="server" Width="100%" AutoGenerateColumns="False"
                                                    CssClass="ContractDetailsDataGrid" AllowCustomPaging="True" AllowSorting="False"
                                                    OnItemDataBound="OnRelatedProtocolsItemDataBound">
                                                    <AlternatingItemStyle CssClass="DataGridAlternatingItem"></AlternatingItemStyle>
                                                    <ItemStyle CssClass="DataGridItem"></ItemStyle>
                                                    <HeaderStyle CssClass="DataGridHeader"></HeaderStyle>
                                                    <Columns>
                                                        <asp:BoundColumn DataField="Name" SortExpression="Name" ReadOnly="True" HeaderText="Name">
                                                        </asp:BoundColumn>
                                                        <asp:TemplateColumn HeaderText="Number">
                                                            <ItemTemplate>
                                                                <asp:LinkButton ID="hlProtocolNumber" Text='<%#DataBinder.Eval(Container.DataItem,"Number").ToString() %>'
                                                                    OnCommand="OnProtocolNumberCommand" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"Number").ToString() %>'
                                                                    runat="server">
                                                                </asp:LinkButton>
                                                            </ItemTemplate>
                                                        </asp:TemplateColumn>
                                                        <asp:BoundColumn DataField="PIName" SortExpression="PIName" ReadOnly="True" HeaderText="PI">
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="OverallStatus" SortExpression="OverallStatus" ReadOnly="True"
                                                            HeaderText="Overall Status"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="Type" SortExpression="Type" ReadOnly="True" HeaderText="Type">
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="ExpirationDate" SortExpression="ExpirationDate" ReadOnly="True"
                                                            HeaderText="Expiration Date" DataFormatString="{0:MM/dd/yyy}"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="Approved" SortExpression="Approved" ReadOnly="True" HeaderText="Approved Number">
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="Enrolled" SortExpression="Enrolled" ReadOnly="True" HeaderText="Enrolled Number">
                                                        </asp:BoundColumn>
                                                    </Columns>
                                                    <PagerStyle Visible="False"></PagerStyle>
                                                </asp:DataGrid>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <table class="ContractDetailsWarnings" width="100%">
                        <tr>
                            <td style="background-color:white;width:2%">
                                &nbsp;</td>
                            <td>
                                &nbsp;<asp:Label ID="relatedProtocolsWarning" runat="server" /></td>
                        </tr>
                    </table>
                    <br />
                    <table class="ContractDetailsStyle" width="100%" cellspacing="0">
                        <tr>
                            <td style="background-color:white;width:2%">
                                &nbsp;<asp:ImageButton ID="associatedAgreementsPanelToggler" runat="server" OnClick="OnAssociatedAgreementsClick">
                                </asp:ImageButton></td>
                            <td style="width:98%" class="ContractDetailsTitle">
                                &nbsp;Associated Agreements</td>
                        </tr>
                    </table>
                    <asp:Panel ID="associatedAgreementsPanel" runat="server">
                        <table id="associatedAgreementsTable" width="100%" cellspacing="0">
                            <tr>
                                <td style="background-color:white;width:2%">
                                    &nbsp;</td>
                                <td>
                                    <table width="100%" cellspacing="0" style="border-left: 1px solid #325486">
                                        <tr>
                                            <td>
                                                <asp:DataGrid ID="associatedAgreements" runat="server" Width="100%" CellSpacing="0"
                                                    AutoGenerateColumns="False" CssClass="ContractDetailsDataGrid" AllowCustomPaging="True"
                                                    AllowSorting="False">
                                                    <AlternatingItemStyle CssClass="DataGridAlternatingItem"></AlternatingItemStyle>
                                                    <ItemStyle CssClass="DataGridItem"></ItemStyle>
                                                    <HeaderStyle CssClass="DataGridHeader"></HeaderStyle>
                                                    <Columns>
                                                        <asp:BoundColumn DataField="Type" SortExpression="Type" ReadOnly="True" HeaderText="Type">
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="Status" SortExpression="Status" ReadOnly="True" HeaderText="Status">
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="ProjectTitle" SortExpression="ProjectTitle" ReadOnly="True"
                                                            HeaderText="Project Title"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="ProjectStartDate" SortExpression="ProjectStartDate" ReadOnly="True"
                                                            HeaderText="Project Start" DataFormatString="{0:MM/dd/yyy}"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="ProjectEndDate" SortExpression="ProjectEndDate" ReadOnly="True"
                                                            HeaderText="Project End" DataFormatString="{0:MM/dd/yyy}"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="BudgetStartDate" SortExpression="BudgetStartDate" ReadOnly="True"
                                                            HeaderText="Budget Start" DataFormatString="{0:MM/dd/yyy}"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="BudgetEndDate" SortExpression="BudgetEndDate" ReadOnly="True"
                                                            HeaderText="Budget End" DataFormatString="{0:MM/dd/yyy}"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="ActivationDate" SortExpression="ActivationDate" ReadOnly="True"
                                                            HeaderText="Activation" DataFormatString="{0:MM/dd/yyy}"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="InactivationDate" SortExpression="InactivationDate" ReadOnly="True"
                                                            HeaderText="Inactivation" DataFormatString="{0:MM/dd/yyy}"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="FundNumber" SortExpression="FundNumber" ReadOnly="True"
                                                            HeaderText="Fund #"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="SponsorName" SortExpression="SponsorName" ReadOnly="True"
                                                            HeaderText="Sponsor"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="PIName" SortExpression="PIName" ReadOnly="True" HeaderText="PI Name">
                                                        </asp:BoundColumn>
                                                    </Columns>
                                                    <PagerStyle Visible="False"></PagerStyle>
                                                </asp:DataGrid>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <table class="ContractDetailsWarnings" width="100%">
                        <tr>
                            <td style="background-color:white;width:2%">
                                &nbsp;</td>
                            <td>
                                &nbsp;<asp:Label ID="associatedAgreementsWarning" runat="server" /></td>
                        </tr>
                    </table>
                    <br />
                    <table class="ContractDetailsStyle" width="100%" border="0" style="border-color:green" cellspacing="0"
                        cellpadding="0">
                        <tr>
                            <td style="background-color:white;width:2%">
                                &nbsp;
                            </td>
                            <td class="ContractDetailsTitle" style="width:98%">
                                &nbsp;<asp:Label ID="lblTermsAndConditions" runat="server" Text="Project Documents"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    
                    <asp:Panel ID="termsAndConditionsPanel" runat="server" Visible="false">
                        <table id="termsAndConditionsTable" cellspacing="0" cellpadding="0" border="0" style="border-color:red"
                            width="100%">
                            <tr>
                                <td style="background-color:white;width:2%">
                                    &nbsp;</td>
                                <td style="width:98%">
                                    <asp:TextBox ID="termsAndConditions" runat="server" Width="100%" CssClass="FlatTextBox"
                                        Height="84px" TextMode="MultiLine" ReadOnly="True"></asp:TextBox></td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <table class="ContractDetailsWarnings" width="100%">
                        <tr>
                            <td style="background-color:white;width:2%">&nbsp;</td>
                            <td>
                                <a id="aProductDocuments" runat="server"></a>
                                <asp:Label ID="lblProjectDocuments" runat="server"  Text=" - Click here to view all Electronically stored documents for this research proposal."></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <br />
                    <table class="ContractDetailsStyle" width="100%" cellspacing="0">
                        <tr>
                            <td style="background-color:white;width:2%">
                                &nbsp;<asp:ImageButton ID="milestonesPanelToggler" runat="server" OnClick="OnMilestonesClick">
                                </asp:ImageButton></td>
                            <td style="width:98%" class="ContractDetailsTitle">
                                &nbsp;Milestones</td>
                        </tr>
                    </table>
                    <asp:Panel ID="milestonesPanel" runat="server">
                        <table id="milestonesTable" width="100%" cellspacing="0">
                            <tr>
                                <td style="background-color:white;width:2%">
                                    &nbsp;</td>
                                <td>
                                    <table width="100%" cellspacing="0" style="border-left: 1px solid #325486">
                                        <tr>
                                            <td>
                                                <asp:DataGrid ID="milestones" runat="server" Width="100%" AutoGenerateColumns="False"
                                                    CssClass="ContractDetailsDataGrid" AllowCustomPaging="True" AllowSorting="False">
                                                    <AlternatingItemStyle CssClass="DataGridAlternatingItem"></AlternatingItemStyle>
                                                    <ItemStyle CssClass="DataGridItem"></ItemStyle>
                                                    <HeaderStyle CssClass="DataGridHeader"></HeaderStyle>
                                                    <Columns>
                                                        <asp:BoundColumn DataField="Type" SortExpression="Type" ReadOnly="True" HeaderText="Type">
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="Description" SortExpression="Description" ReadOnly="True"
                                                            HeaderText="Description"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="DateExpected" SortExpression="DateExpected" ReadOnly="True"
                                                            HeaderText="Date Expected" DataFormatString="{0:MM/dd/yyy}"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="DateCompleted" SortExpression="DateCompleted" ReadOnly="True"
                                                            HeaderText="Date Completed" DataFormatString="{0:MM/dd/yyy}"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="Status" SortExpression="Status" ReadOnly="True" HeaderText="Status"
                                                            DataFormatString="{0}"></asp:BoundColumn>
                                                    </Columns>
                                                    <PagerStyle Visible="False"></PagerStyle>
                                                </asp:DataGrid>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <table class="ContractDetailsWarnings" width="100%">
                        <tr>
                            <td style="background-color:white;width:2%">
                                &nbsp;</td>
                            <td>
                                &nbsp;<asp:Label ID="milestonesWarning" runat="server" /></td>
                        </tr>
                    </table>
                    <br />
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
